package com.example.yijian.edit.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.yijian.R;
import com.example.yijian.edit.data.AssetInfoDescription;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class AssetRecyclerViewAdapter extends BaseQuickAdapter<AssetInfoDescription, BaseViewHolder> {

    public AssetRecyclerViewAdapter(List<AssetInfoDescription> data) {
        super(R.layout.adapter_edit_type, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, AssetInfoDescription assetInfoDescription) {
        holder.setImageResource(R.id.iv_edit_type, assetInfoDescription.mImageId)
                .setText(R.id.tv_edit_type, assetInfoDescription.mAssetName);
        holder.itemView.setTag(assetInfoDescription.mAssetName);

    }
}
